package com.ruipengkj.commons.service;

import java.io.Serializable;
import java.util.List;

import com.ruipengkj.commons.base.query.PageModel;

public interface IGenericService<T, ID extends Serializable> {
	//保存
	public void saveService(T entity)throws Exception ;
	//保存
	public Serializable saveRetService(T entity)throws Exception;
	//保存或修改
	public void saveOrUpdateService(T entity)throws Exception ;
	//根据ID删除
	public void deleteService(ID id)throws Exception ;
	//修改
	public void modifyService(T entity)throws Exception ;
	//根据id查找
	public T getByIdService(ID id) throws Exception ;
	//根据条件翻页查询
	public PageModel<T> getScrollService(int firstResult,int maxResult,T entity) throws Exception ;
	//根据条件查询
	public List<T> findService(T entity) throws Exception ;
}
